/*
 * @Author: your name
 * @Date: 2020-06-02 16:26:34
 * @LastEditTime: 2020-06-02 23:07:33
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \mobile_project_200106\mobile_project\src\request\api\user.js
 */ 

 let userModule={
     namespaced:true,
     state:{
         token:localStorage.getItem("token") || "" //密钥
     },
     mutations:{
        ["GET_TOKEN"](state,token){
             state.token=token
             localStorage.setItem("token",state.token)//获取密钥
         },
         ["REMOVE_TOKEN"](state){
            state.token=""
            localStorage.removeItem("token")//清除密钥
        },
     }
 }

 export default userModule